﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Shpm.System.Db;
using Shpm.App.Input.Bean;
using System.Collections;

/// <summary>
/// Summary description for HappyPlanResultDao
/// </summary>
namespace Shpm.App.Input.Dao
{
    public class HappyPlanResultDao : ShpmBaseDao
    {
        public const string INSERT_HAPPY_PLAN_RESULT = "HappyPlanResult.InsertHappyPlanResult";

        // 活动计划 update
        public const string UPDATE_HAPPY_PLAN_RESULT = "HappyPlanResult.UpdateHappyPlanResult";

        public const string LOAD_HAPPY_PLAN_RESULT_BY_RESULT_ID = "HappyPlanResult.LoadHappyPlanResultByResultId";
        public const string LOAD_HAPPY_PLAN_RESULT_BY_ACTION_ID = "HappyPlanResult.LoadHappyPlanResultByActionId";
        public const string LOAD_HAPPY_PLAN = "HappyPlanResult.LoadHappyPlan";
        public const string DEL_HAPPY_PLAN_RESULT = "HappyPlanResult.DelHappyPlanResult";

        //义工活动
        public const string FIND_HAPPY_PLAN_RESULT = "HappyPlanResult.LstHappyPlanResult";
        //所有活动
        public const string FIND_HAPPY_PLANS = "HappyPlanResult.LstHappyPlans";

        public HappyPlanResultDao()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public object Insert(HappyPlanResultBean bean)
        {

            return base.Insert(INSERT_HAPPY_PLAN_RESULT, bean);
        }

        public int Update(HappyPlanResultBean bean)
        {
            return base.Update(UPDATE_HAPPY_PLAN_RESULT, bean);
        }

        public HappyPlanResultBean FindHappyPlan(HappyPlanResultBean bean)
        {
            return (HappyPlanResultBean)base.QueryForObject(LOAD_HAPPY_PLAN, bean);
        }

        public HappyPlanResultBean LoadHappyPlanResultByActionId(HappyPlanResultBean bean)
        {
            return (HappyPlanResultBean)base.QueryForObject(LOAD_HAPPY_PLAN_RESULT_BY_ACTION_ID, bean);
        }
        public HappyPlanResultBean LoadHappyPlanResultByResultId(HappyPlanResultBean bean)
        {
            return (HappyPlanResultBean)base.QueryForObject(LOAD_HAPPY_PLAN_RESULT_BY_RESULT_ID, bean);
        }
        public IList FindHappyPlanResult()
        {
            return base.QueryForList(FIND_HAPPY_PLAN_RESULT, new HappyPlanResultBean());
        }

        public IList FindHappyPlans()
        {
            return base.QueryForList(FIND_HAPPY_PLANS, new HappyPlanResultBean());
        }

        public int Delete(HappyPlanResultBean bean)
        {
            return base.Delete(DEL_HAPPY_PLAN_RESULT, bean);
        }
    }
}